//
//  HttpAPIConfig.h
//  Test
//
//  Created by admin on 2019/4/26.
//  Copyright © 2019 admin. All rights reserved.
//

#ifndef HttpAPIConfig_h
#define HttpAPIConfig_h

#import <Foundation/Foundation.h>


@class HttpResponse;

/**
 token失效通知
 */
#define kTokenExpiredNotification  @"kTokenExpiredNotification"


/**
 存储体统时间
 */
#define keySystemTime  @"kSystemTime"

/**
 *  监听进度响应block
 */
typedef void (^HttpProgressBlock)(NSProgress * _Nullable progress);

/**
 *   请求响应block
 */
typedef void (^HttpResponseBlock)(HttpResponse * _Nullable response);

/**
 *  请求方式
 */
typedef NS_ENUM(NSUInteger, HttpMethod) {
    HttpMethodGET = 0,
    HttpMethodPOST,
    HttpMethodPUT,
    HttpMethodDELETE
};


/**
 *  请求数据类型
 */
typedef NS_ENUM(NSUInteger, HttpRequestDataType) {
    
    HttpRequestDataTypeJSON = 0,
    
    HttpRequestDataTypeHttp,
    
};

/**
 *  返回数据类型
 */
typedef NS_ENUM(NSUInteger, HttpResponseDataType) {
    
    HttpResponseDataTypeJSON = 0,
    
    HttpResponseDataTypeHttp,
};



typedef NS_ENUM(NSInteger,APIErrorType) {
    
    httpError,      ///网络失败
    
    requestError,   ///请求错误 例如:参数错误
    
    apiError,       ///服务端返回接口失败
    
    dataError,      ///数据错误
    
    authorError     ///用户认证失败
};


#endif /* HttpAPIConfig_h */
